import request from '@/utils/request'

export default {
	// 置换详情
	substitutionDetail(id) {
		return request({
			url: `/ws/displace/detail/${id}`,
			method: 'get',
		})
	},
	
	// 计算服务费用
	substitutionFee(params) {
		return request({
			url: '/ws/displaceOrder/getServicePrice',
			method: 'get',
			data: params
		})
	},
	
	// 发布置换
	substitution(params) {
		return request({
			url: `/ws/displaceOrder/release/${params.payPassword}`,
			method: 'post',
			data: params
		})
	},
	
	// 置换列表
	substitutionList(params) {
		return request({
			url: '/ws/displace/list',
			method: 'get',
			data: params
		})
	},
	
	// 我的置换列表
	mySubstitutionList(params) {
		return request({
			url: '/ws/displace/mine/list',
			method: 'get',
			data: params
		})
	},
	
	// 我要置换
	mySubstitution(params) {
		return request({
			url: '/ws/displace/displace',
			method: 'get',
			data: params
		})
	},
	
	// 同意置换
	agreeSubstitution(params) {
		return request({
			url: '/ws/displace/agree',
			method: 'get',
			data: params
		})
	}
	
	
}